import 'dart:io';

import '../provider/global_key_provider.dart';
import 'package:flutter/material.dart';

final MediaQueryData _mediaQuery = MediaQuery.of(GlobalKeyProvider.navigatorContext!);

class DeviceHelper {
  const DeviceHelper._();

  static double get screenWidth => _mediaQuery.size.width;

  static double get screenHeight => _mediaQuery.size.height;

  static double get topBarHeight => _mediaQuery.padding.top;

  static double get botBarHeight => _mediaQuery.padding.bottom;

  static double get keyboardHeight => _mediaQuery.viewInsets.bottom;

  static bool get isAndroid => Platform.isAndroid;

  static bool get isIos => Platform.isIOS;
}
